<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
<!--    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">-->
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
    <title>Circle Countdown</title>

    <style>
        * {
            margin: 0;
            padding: 0;
        }
        .container {
            position: relative;
            width: 100vw;
            height: 100vh;
            overflow: hidden;
        }


    </style>
</head>
<body>
<div class="container">
<h1>TEST.html</h1>
</div>
<script>
    const img = new Image();
    img.src = 'static/src/image/avatar/avatars-10.png';

    const compressedImg = img.src.replace(/\.(jpg|jpeg|png|gif)$/i, '.jpg');

    const compressedDataURL = compressedImg.split('.').reduce((data, part) => {
        const len = part.length;
        const compressedLen = Math.min(len, 512);
        const compressedData = new Uint8Array(compressedLen);
        for (let i = 0; i < compressedLen; i++) {
            compressedData[i] = part.charCodeAt(i);
        }
        return compressedData;
    }, null);

    const compressedFile = new Blob([compressedDataURL], { type: 'image/jpeg' });

    console.log('compressedFile',compressedFile)
    const link = document.createElement('a');
    link.download = 'compressed-image.jpg';
    link.href = compressedFile.URL;
    link.click();

</script>
</body>
</html>